//
//  RatesViewController.h
//  PriceOnline
//
//  Created by Le Anh Tai on 8/11/13.
//  Copyright (c) 2013 Le Anh Tai. All rights reserved.
//

#import "BaseViewController.h"
#import "Global.h"
#import "PullToRefreshView.h"
#import "DetailUpDownRateCallOutView.h"
#import "AdsCell.h"

@interface RatesViewController : BaseViewController<UITableViewDataSource, UITableViewDelegate,PullToRefreshViewDelegate,DetailUpDownRateCalloutViewDelegate>
{
    NSMutableDictionary *_exchangeRatesDic;
    NSMutableDictionary *_preExchangeRatesDic;
    
    __block BOOL _fetchingExchangeRates;
    __block ThreadStatus _refreshExchangeRatesThreadStatus;
    
    BOOL _isPressedRefresh;
    
    PullToRefreshView *_pullToRefreshView;
    DetailUpDownRateCallOutView *_detailCallOut;
    NSInteger _lastContentOffsetY;
    NSIndexPath *_selectedIndexPath;
    NSString *_curUpdateString;
    NSDate *_lastUpdate;
}

@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
@property (weak, nonatomic) IBOutlet UILabel *typeLabel;
@property (weak, nonatomic) IBOutlet UILabel *buyLabel;
@property (weak, nonatomic) IBOutlet UILabel *ckLabel;
@property (weak, nonatomic) IBOutlet UILabel *sellLabel;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UILabel *unitLabel;
@property (weak, nonatomic) IBOutlet UIButton *refreshButton;
@property (weak, nonatomic) IBOutlet UIView *headerView;

- (IBAction)refreshButtonPress:(id)sender;
- (void)saveLastIndexPath;

- (void)removeCalloutView;

@end
